package com.example.demo.controller;



import com.example.demo.model.R;

import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;



@RestController
public class LoginController {

    @RequestMapping("login")
    public R login(String username, String password) {
        if (username.equals("admin") && password.equals("123")) {
            return new R(0, "success", null);
        }
        return new R(1, "failed", null);
    }
}
